package io.mya.app.user.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import io.mya.app.user.dao.AppUserDao;
import io.mya.app.user.entity.UserQuotationEntity;
import io.mya.modules.customer.entity.CustomerEntity;
/**
 * 用户注册通用service实现类 包括增删改查 使用到用户数据的全在此service调用方法
 * @author shican
 * @date 2018年3月29日
 * 1208296327@qq.com
 */
@Service("appUserService")
public class AppUserServiceImpl implements io.mya.app.user.service.AppUserService {
	@Autowired
	private AppUserDao appUserDao;
	
	@Override
	public CustomerEntity queryUserByEmail(String registerMail) {
		// TODO Auto-generated method stub
		return appUserDao.queryUserByEmail(registerMail);
	}

	@Override
	public void save(CustomerEntity entity) {
		// TODO Auto-generated method stub
		appUserDao.save(entity);
	}

	@Override
	public Long queryUserByCode(String invitecode) {
		// TODO Auto-generated method stub
		return appUserDao.queryUserByCode(invitecode);
	}

	@Override
	public CustomerEntity queryUserById(Long id) {
		// TODO Auto-generated method stub
		return appUserDao.queryUserById(id);
	}

	@Override
	public void update(CustomerEntity customerEntity) {
		// TODO Auto-generated method stub
		appUserDao.update(customerEntity);
	}

	@Override
	public void addCandyCount(Map<String, Object> map) {
		// TODO Auto-generated method stub
		appUserDao.addCandyCount(map);
	}

	@Override
	public CustomerEntity queryUserByEmailToLogin(String email) {
		// TODO Auto-generated method stub
		return appUserDao.queryUserByEmailToLogin(email);
	}

	@Override
	public List<UserQuotationEntity> selectQuotation(Long id) {
		// TODO Auto-generated method stub
		return appUserDao.selectQuotation(id);
	}

	@Override
	public void addseting(UserQuotationEntity quotationEntity) {
		// TODO Auto-generated method stub
		appUserDao.addseting(quotationEntity);
	}

	@Override
	public void delesetting(UserQuotationEntity quotationEntity) {
		// TODO Auto-generated method stub
		appUserDao.delesetting(quotationEntity);
	}

	@Override
	public List<UserQuotationEntity> queryselect(Long id) {
		// TODO Auto-generated method stub
		return appUserDao.queryselect(id);
	}

	@Override
	public void sortsetting(List<UserQuotationEntity> list) {
		// TODO Auto-generated method stub
		appUserDao.sortsetting(list);
	}

}
